const { sequelize } = require('../db');

// 模型加载
const User = require("./user");
const WordVector = require("./wordvector");
const MailCheck = require("./mailcheck");
// 定义关系


/**
 * @function createTable 创建表 
 * @param {Boolean} ifcreated 是否强制删除并重新创建
 */
const creatTable = async (ifcreated = false) => {
    try {
        await sequelize.sync({ force: ifcreated });
        if (ifcreated) {
            console.log("you have recreated all table.");
        }
    } catch (error) {
        throw error;
    }
}

creatTable(false);
 